/*
 * jdbc-trace-wrapper
 * Copyright (C) 2010. The jdbc-trace-wrapper Project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package nz.jdbcwrapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import oracle.jdbc.OracleResultSet;
import oracle.sql.ARRAY;
import oracle.sql.BFILE;
import oracle.sql.BLOB;
import oracle.sql.CHAR;
import oracle.sql.CLOB;
import oracle.sql.CustomDatum;
import oracle.sql.CustomDatumFactory;
import oracle.sql.DATE;
import oracle.sql.Datum;
import oracle.sql.INTERVALDS;
import oracle.sql.INTERVALYM;
import oracle.sql.NUMBER;
import oracle.sql.OPAQUE;
import oracle.sql.ORAData;
import oracle.sql.ORADataFactory;
import oracle.sql.RAW;
import oracle.sql.REF;
import oracle.sql.ROWID;
import oracle.sql.STRUCT;
import oracle.sql.TIMESTAMP;
import oracle.sql.TIMESTAMPLTZ;
import oracle.sql.TIMESTAMPTZ;


class WrapperOracleResultSet extends WrapperResultSet implements OracleResultSet
{
  private final OracleResultSet oracleResultSet;

  public WrapperOracleResultSet(Data data,
          WrapperStatement statement,
          Statistic statistic,
          String parentPrefix,
          OracleResultSet oracleResultSet) throws WrapperException
  {
    super(data, statement, statistic, parentPrefix, oracleResultSet);
    this.oracleResultSet = oracleResultSet;  // Same object as parent class holds
  }

    public ARRAY getARRAY(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getARRAY(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ARRAY result = oracleResultSet.getARRAY(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public ARRAY getARRAY(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getARRAY(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ARRAY result = oracleResultSet.getARRAY(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public BFILE getBFILE(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getBFILE(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            BFILE result = oracleResultSet.getBFILE(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public BFILE getBFILE(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getBFILE(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            BFILE result = oracleResultSet.getBFILE(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public BFILE getBfile(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getBfile(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            BFILE result = oracleResultSet.getBfile(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public BFILE getBfile(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getBfile(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            BFILE result = oracleResultSet.getBfile(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public BLOB getBLOB(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getBLOB(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            BLOB result = oracleResultSet.getBLOB(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public BLOB getBLOB(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getBLOB(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            BLOB result = oracleResultSet.getBLOB(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public CHAR getCHAR(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCHAR(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            CHAR result = oracleResultSet.getCHAR(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public CHAR getCHAR(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCHAR(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            CHAR result = oracleResultSet.getCHAR(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public CLOB getCLOB(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCLOB(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            CLOB result = oracleResultSet.getCLOB(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public CLOB getCLOB(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCLOB(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            CLOB result = oracleResultSet.getCLOB(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }


    public DATE getDATE(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getDATE(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            DATE result = oracleResultSet.getDATE(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public DATE getDATE(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getDATE(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            DATE result = oracleResultSet.getDATE(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public Datum getOracleObject(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getOracleObject(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            Datum result = oracleResultSet.getOracleObject(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public Datum getOracleObject(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getOracleObject(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            Datum result = oracleResultSet.getOracleObject(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public INTERVALDS getINTERVALDS(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getINTERVALDS(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            INTERVALDS result = oracleResultSet.getINTERVALDS(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public INTERVALDS getINTERVALDS(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getINTERVALDS(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            INTERVALDS result = oracleResultSet.getINTERVALDS(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public INTERVALYM getINTERVALYM(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getINTERVALYM(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            INTERVALYM result = oracleResultSet.getINTERVALYM(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public INTERVALYM getINTERVALYM(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getINTERVALYM(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            INTERVALYM result = oracleResultSet.getINTERVALYM(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public NUMBER getNUMBER(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getNUMBER(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            NUMBER result = oracleResultSet.getNUMBER(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public NUMBER getNUMBER(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getNUMBER(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            NUMBER result = oracleResultSet.getNUMBER(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public OPAQUE getOPAQUE(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getOPAQUE(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            OPAQUE result = oracleResultSet.getOPAQUE(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public OPAQUE getOPAQUE(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getOPAQUE(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            OPAQUE result = oracleResultSet.getOPAQUE(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public RAW getRAW(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getRAW(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            RAW result = oracleResultSet.getRAW(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public RAW getRAW(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getRAW(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            RAW result = oracleResultSet.getRAW(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public REF getREF(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getREF(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            REF result = oracleResultSet.getREF(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public REF getREF(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getREF(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            REF result = oracleResultSet.getREF(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public ROWID getROWID(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getROWID(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ROWID result = oracleResultSet.getROWID(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public ROWID getROWID(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getROWID(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ROWID result = oracleResultSet.getROWID(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public ResultSet getCursor(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCursor(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ResultSet result = oracleResultSet.getCursor(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public ResultSet getCursor(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCursor(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ResultSet result = oracleResultSet.getCursor(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public STRUCT getSTRUCT(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getSTRUCT(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            STRUCT result = oracleResultSet.getSTRUCT(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public STRUCT getSTRUCT(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getSTRUCT(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            STRUCT result = oracleResultSet.getSTRUCT(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public TIMESTAMP getTIMESTAMP(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getTIMESTAMP(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            TIMESTAMP result = oracleResultSet.getTIMESTAMP(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public TIMESTAMP getTIMESTAMP(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getTIMESTAMP(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            TIMESTAMP result = oracleResultSet.getTIMESTAMP(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public TIMESTAMPLTZ getTIMESTAMPLTZ(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getTIMESTAMPLTZ(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            TIMESTAMPLTZ result = oracleResultSet.getTIMESTAMPLTZ(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public TIMESTAMPLTZ getTIMESTAMPLTZ(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getTIMESTAMPLTZ(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            TIMESTAMPLTZ result = oracleResultSet.getTIMESTAMPLTZ(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public TIMESTAMPTZ getTIMESTAMPTZ(String arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getTIMESTAMPTZ(String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            TIMESTAMPTZ result = oracleResultSet.getTIMESTAMPTZ(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public TIMESTAMPTZ getTIMESTAMPTZ(int arg0) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getTIMESTAMPTZ(int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            TIMESTAMPTZ result = oracleResultSet.getTIMESTAMPTZ(arg0);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateARRAY(String arg0, ARRAY arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateARRAY(String, ARRAY)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateARRAY(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateARRAY(int arg0, ARRAY arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateARRAY(int, ARRAY)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateARRAY(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateBFILE(String arg0, BFILE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateBFILE(String, BFILE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateBFILE(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateBFILE(int arg0, BFILE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateBFILE(int, BFILE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateBFILE(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateBLOB(String arg0, BLOB arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateBLOB(String, BLOB)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateBLOB(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateBLOB(int arg0, BLOB arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateBLOB(int, BLOB)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateBLOB(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateBfile(String arg0, BFILE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateBfile(String, BFILE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateBfile(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateBfile(int arg0, BFILE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateBfile(int, BFILE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateBfile(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateCHAR(String arg0, CHAR arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateCHAR(String, CHAR)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateCHAR(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateCHAR(int arg0, CHAR arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateCHAR(int, CHAR)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateCHAR(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateCLOB(String arg0, CLOB arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateCLOB(String, CLOB)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateCLOB(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateCLOB(int arg0, CLOB arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateCLOB(int, CLOB)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateCLOB(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateDATE(String arg0, DATE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateDATE(String, DATE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateDATE(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateDATE(int arg0, DATE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateDATE(int, DATE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateDATE(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateINTERVALDS(int arg0, INTERVALDS arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateINTERVALDS(int, INTERVALDS)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateINTERVALDS(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateINTERVALYM(int arg0, INTERVALYM arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateINTERVALYM(int, INTERVALYM)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateINTERVALYM(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateNUMBER(String arg0, NUMBER arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateNUMBER(String, NUMBER)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateNUMBER(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateNUMBER(int arg0, NUMBER arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateNUMBER(int, NUMBER)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateNUMBER(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateORAData(String arg0, ORAData arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateORAData(String, ORAData)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateORAData(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateORAData(int arg0, ORAData arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateORAData(int, ORAData)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateORAData(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateOracleObject(String arg0, Datum arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateOracleObject(String, Datum)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateOracleObject(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateOracleObject(int arg0, Datum arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateOracleObject(int, Datum)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateOracleObject(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateRAW(String arg0, RAW arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateRAW(String, RAW)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateRAW(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateRAW(int arg0, RAW arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateRAW(int, RAW)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateRAW(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateREF(String arg0, REF arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateREF(String, REF)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateREF(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateREF(int arg0, REF arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateREF(int, REF)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateREF(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateROWID(String arg0, ROWID arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateROWID(String, ROWID)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateROWID(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateROWID(int arg0, ROWID arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateROWID(int, ROWID)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateROWID(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateSTRUCT(String arg0, STRUCT arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateSTRUCT(String, STRUCT)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateSTRUCT(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateSTRUCT(int arg0, STRUCT arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateSTRUCT(int, STRUCT)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateSTRUCT(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateTIMESTAMP(int arg0, TIMESTAMP arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateTIMESTAMP(int, TIMESTAMP)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateTIMESTAMP(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public CustomDatum getCustomDatum(String arg0, CustomDatumFactory arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCustomDatum(String, CustomDatumFactory)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            CustomDatum result = oracleResultSet.getCustomDatum(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public CustomDatum getCustomDatum(int arg0, CustomDatumFactory arg1)  throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getCustomDatum(int, CustomDatumFactory)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            CustomDatum result = oracleResultSet.getCustomDatum(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public ORAData getORAData(String arg0, ORADataFactory arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getORAData(String, ORADataFactory)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ORAData result = oracleResultSet.getORAData(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public ORAData getORAData(int arg0, ORADataFactory arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " getORAData(int, ORADataFactory)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            ORAData result = oracleResultSet.getORAData(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, Util.toString(result));
            return result;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateCustomDatum(String arg0, CustomDatum arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateCustomDatum(String, CustomDatum)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateCustomDatum(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateCustomDatum(int arg0, CustomDatum arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateCustomDatum(int, CustomDatum)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateCustomDatum(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateTIMESTAMPLTZ(int arg0, TIMESTAMPLTZ arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateTIMESTAMPLTZ(int, TIMESTAMPLTZ)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateTIMESTAMPLTZ(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void updateTIMESTAMPTZ(int arg0, TIMESTAMPTZ arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 6)
            key = Util.traceBegin(prefix + " updateTIMESTAMPTZ(int, TIMESTAMPTZ)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oracleResultSet.updateTIMESTAMPTZ(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 6)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            duration = System.currentTimeMillis() - start;
            if (data.trace >= 6)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

}
